Skip to content

feat: port cert rotation streaming - #17916

Draft
agrawalradhika-cell wants to merge 9 commits into
googleapis:mainfrom
agrawalradhika-cell:feature/cert-rotation-streaming
Draft

feat: port cert rotation streaming#17916
agrawalradhika-cell wants to merge 9 commits into
googleapis:mainfrom
agrawalradhika-cell:feature/cert-rotation-streaming

Conversation

@agrawalradhika-cell

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@agrawalradhika-cell
agrawalradhika-cell requested review from a team as code owners July 27, 2026 21:26
@agrawalradhika-cell
agrawalradhika-cell marked this pull request as draft July 27, 2026 21:27
@agrawalradhika-cell
agrawalradhika-cell removed request for a team July 27, 2026 21:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism for transparent mTLS credential rotation and retries in gRPC channels by implementing a call interceptor (_MTLSCallInterceptor), a refreshing channel wrapper (_MTLSRefreshingChannel), and several retryable call wrappers. Feedback on these changes highlights a critical race condition in _RetryableStreamUnaryFuture between the client thread calling result() and the gRPC callback thread, which can be resolved using a pending retry flag and a condition variable. Additionally, to prevent thread leaks, it is recommended to avoid creating a ThreadPoolExecutor per interceptor instance and instead use a daemon thread for asynchronous retries.

Comment thread packages/google-auth/google/auth/transport/grpc.py Outdated
Comment thread packages/google-auth/google/auth/transport/grpc.py
@agrawalradhika-cell
agrawalradhika-cell force-pushed the feature/cert-rotation-streaming branch from 53f1321 to af28bfb Compare August 5, 2026 02:44
@agrawalradhika-cell
agrawalradhika-cell force-pushed the feature/cert-rotation-streaming branch from af28bfb to e32e706 Compare August 5, 2026 18:46
@agrawalradhika-cell
agrawalradhika-cell force-pushed the feature/cert-rotation-streaming branch from fc5735c to 1f85737 Compare August 5, 2026 21:27
@agrawalradhika-cell
agrawalradhika-cell force-pushed the feature/cert-rotation-streaming branch from 1f85737 to 8ea0944 Compare August 5, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant